<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <!-- import CSS -->
  <link rel="stylesheet" href="https://cdn.staticfile.org/element-ui/2.15.9/theme-chalk/index.css">
</head>
<body>
<div id="app">
  <h1>{{info}}</h1>
  <el-dropdown @command="handleCommand">
  <span class="el-dropdown-link">
    下拉菜单<i class="el-icon-arrow-down el-icon--right"></i>
  </span>
  <el-dropdown-menu slot="dropdown">

    <el-dropdown-item v-for = "i in arr" :command="i.price">{{i.title}}</el-dropdown-item>
  </el-dropdown-menu>
  </el-dropdown>
  <template>
      <el-option
              v-for="item in arr"
              :price="item.price"
              :title="item.title">
      </el-option>
  </template>

</div>
</body>
<!-- import Vue before Element -->
<script src="https://cdn.staticfile.org/vue/2.6.14/vue.min.js"></script>
<!-- import JavaScript -->
<script src="https://cdn.staticfile.org/element-ui/2.15.9/index.min.js"></script>
<script>
  let v = new Vue({
    el: '#app',
    data: function() {
      return {
        arr:[{title:"小米手机",price:"3000"},
          {title:"华为手机",price:"4000"},
          {title:"老八",price:"30000"},
          {title:"ikun身份证",price:"-300"}],
        title:"",info:""
      }
    },
    methods:{
      handleCommand(command){
        v.$message(command);
        v.info = command;
      }
    }
  })
</script>
</html>